# SPDX-FileCopyrightText: 2023-2025 Sangfor Technologies Inc.
# SPDX-License-Identifier: Mulan PSL v2
#!/bin/bash

# 部署的主要逻辑
function main() {
    k8sctl="kubectl --insecure-skip-tls-verify --context=${K8S_CLUSTER}"

    ${k8sctl} apply -f deploy/rbac.yaml
    ${k8sctl} apply -f deploy/service.yaml
    ${k8sctl} apply -f deploy/serviceaccount-aip-service.yaml
    cat deploy/deployment.yaml | sed "s#DOCKER_IMAGE_NAME#${DOCKER_IMAGE_NAME}#" | ${k8sctl} apply -f -
}

main
